package synchronicity.calendar;

import synchronicity.util.Range;
import synchronicity.util.RangeSet;

/**
 * For unit testing
 */
public class MockCalendar implements Calendar {
	
	private RangeSet calendarItems;
	
	public MockCalendar() {
		calendarItems = new RangeSet();
	}
	
	public MockCalendar(RangeSet set){
		calendarItems = set;
	}
	
	public void setRanges(RangeSet set){
		calendarItems = set;
	}

	/**
	 * Returns an empty range set for now
	 */
	public RangeSet getBusyTimes(Range dateRange) {
		return calendarItems;
	}
	
	public void addCalendarItem(Range dateRange, String title) throws ModifyCalendarFailedException{
		calendarItems.addRange(dateRange);
	}
}
